﻿
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TemplateWeb.Models.ViewModels.GroupViewModel>" %>

<div class="box_border" style="margin: 10px 0 12px 10px; border: none;">
    <div class="NewsDetail">
        <div class="NewsDetail-title">
            <h1 class="titlePage">Album: <%= Model.AlbumModel.GetModel.LstObjModel[0].TenAlbum %></h1>
        </div>
        <div class="ArticleContent">
            <%= Model.AlbumModel.GetModel.LstObjModel[0].GioiThieu %>
        </div>
        <div class="ArticleContent">
            <div class="topProducts">
                <% 
                    int numRow = 0;
                    for (int i = 0; i < Model.VideoModel.GetModel.LstObjModel.Count; i++)
                    {
                        if (i % 4 == 0)
                        {
                            numRow++;
                            if (numRow < (Model.VideoModel.GetModel.LstObjModel.Count % 4 == 0 ? Model.VideoModel.GetModel.LstObjModel.Count / 4 : (Model.VideoModel.GetModel.LstObjModel.Count / 4 + 1)))
                            { 
                            %>
                                <ul class="goiThietKeWebTheoNganh" style="margin-left: 0px; padding-left: 30px;">
                        <% }
                            else
                            { %>
                                <ul style="margin-left: 0px; padding-left: 30px; list-style: none; height: 160px;">
                         <% }
                        } %>

                                    <li>
                                        <div class="itemProducts">
                                            <a href="<%= Url.Action("ShowVideo", "Home", new { idalbum = Model.AlbumModel.GetModel.LstObjModel[0].ID, id = Model.VideoModel.GetModel.LstObjModel[i].ID }) %>">
                                                <img src="../../Content/Images/Items/<%= Model.VideoModel.GetModel.LstObjModel[i].HinhMinhHoa %>" alt="" border="0" />
                                            </a>
                                            <a href="<%= Url.Action("ShowVideo", "Home", new { idalbum = Model.AlbumModel.GetModel.LstObjModel[0].ID, id = Model.VideoModel.GetModel.LstObjModel[i].ID }) %>"><%= Model.VideoModel.GetModel.LstObjModel[i].TenVideo %></a>
                                        </div>
                                    </li>

                    <% if (i % 4 == 3)
                        { %>
                                </ul>
                     <% } %>
                <% } %>
            </div>
        </div>
        <div class="other"></div>
        <% GridPagerProperties properties = new GridPagerProperties()
            {
                //paging
                PageSize = WebConfiguration.NumVideoPerPage,
                RecordCount = Model.VideoModel.GetModel.TotalItem,
                CurrentPageIndex = Model.VideoModel.GetModel.CurrentPage,
                TransferValue = Model.VideoModel.ReferKeys.IDAlbum,
                TypeOfParam = EnumTypeOfParam.VIDEO,
                //action link
                Controller = "Home",
                ActionName = "Video"
            }; 
        %>
        <%= Html.GridPagerWithoutAjax(properties)%>
    </div>
</div>